//Vue.directive('指令名', {
//     inserted(el, binding) {
//         console.log(el); //el是指令所在的dom节点
//         console.log(binding);//binding是绑定的相关信息
//     }
// })
// import Vue from "vue";
// Vue.directive('imgerror', {
//     inserted(el, binding) {
//         console.log(el);
//         console.log(binding);
//     }
// })

//自定义指令
export const imgerror = {
    inserted(el, binding) {
        el.onerror = function() {
            console.log('图片出错了');
            el.src = binding.value
        }
    }
}
export const aaa = {
    inserted(el, binding) {

    }
}
export const bbb = {
    inserted(el, binding) {

    }
}